import request from '@/utils/request';

// 查询资源列表
export function listResource(query) {
  // return request({
  //   url: '/resource/buildTreeList',
  //   method: 'get',
  //   params: query
  // })
  return request({
    url: '/resource/buildTreeList',
    method: 'get',
    params: query
  })
}

//查询资源
export function getResourceInfo(id) {
  return request({
    url: '/resource/' + id,
    method: 'get'
  })
}

// 新增资源信息
export function addResourceInfo(data) {
  return request({
    url: '/resource',
    method: 'post',
    data: data
  })
}

// 修改应用信息
export function updateResourceInfo(data) {
  return request({
    url: '/resource',
    method: 'put',
    data: data
  })
}

// 删除应用信息
export function delResourceInfo(id) {
  return request({
    url: '/resource/' + id,
    method: 'delete'
  })
}
